package sk.naive.talker;

import sk.naive.talker.persistence.PersistenceException;
import sk.naive.talker.props.PropertyStoreException;

import java.util.Collection;
import java.rmi.RemoteException;

/**
 *
 * @author <a href="mailto:rytier@naive.deepblue.sk">Martin "Rytier" Kerni</a>
 * @version $Revision: 1.10 $ $Date: 2005/02/20 13:08:16 $
 */
public interface LocationFinder {
	Location findLocationById(Integer id);
	Location findLocationByName(String name);
	Location findLocationForUser(User user);

	void userToLocation(User user, Location loc);

	Collection<Location> locations();
	Collection<String> locationNames();

	Location createLocation(String name) throws PersistenceException;
	void destroy(Location loc) throws PersistenceException, PropertyStoreException, RemoteException;
	void rename(Location loc, String newName) throws PropertyStoreException;
}
